﻿<UserControl x:Class="EraDeiFessi.Controls.LinkOperations"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:myControls="clr-namespace:EraDeiFessi.Controls"
             mc:Ignorable="d" 
            Height="100">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        
        <GroupBox Margin="2 6 2 2" Header="Link originale">
            <StackPanel Margin="2 6 2 2" VerticalAlignment="Center" Orientation="Vertical" HorizontalAlignment="Center">
                <Button Margin="2" Width="180" Height="25" Click="btnCopy_Click">
                    <StackPanel Orientation="Horizontal">
                        <myControls:AutoGreyableImage Source="..\Resources\icon_clipboard.png" Margin="2"/>
                        <TextBlock Margin="2" VerticalAlignment="Center">Copia link</TextBlock>
                    </StackPanel>
                </Button>
                <Button Margin="2" Width="180" Height="25" Click="btnOpenInBrowser_Click">
                    <StackPanel Orientation="Horizontal">
                        <myControls:AutoGreyableImage Source="..\Resources\icon_chrome.png" Margin="2"/>
                        <TextBlock Margin="2" VerticalAlignment="Center">Apri nel browser</TextBlock>
                    </StackPanel>
                </Button>
            </StackPanel>
        </GroupBox>

        <GroupBox Margin="2" Grid.Column="1">
            <GroupBox.Header>
                <StackPanel Orientation="Horizontal" Margin="0">
                    <Button x:Name="btnUnrestrict" Click="btnUnrestrict_Click" Height="22">
                        <StackPanel Orientation="Horizontal">
                            <myControls:AutoGreyableImage Source="..\Resources\icon_rd.png" Margin="2"/>
                            <TextBlock Margin="2" VerticalAlignment="Center">Sblocca con Real-Debrid</TextBlock>
                        </StackPanel>
                    </Button>
                    <StackPanel Orientation="Horizontal"  Margin="10 2 2 2" x:Name="stackLinkSupported">
                        <TextBlock Text="&#x2714;  " FontWeight="Bold" Foreground="Green"/>
                        <TextBlock Text="Supportato!" Foreground="Green"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal"  Margin="10 2 2 2" x:Name="stackLinkUnsupported">
                        <TextBlock Text="&#x2718;  " FontWeight="Bold" Foreground="Red"/>
                        <TextBlock Text="Sito non supportato da Real-Debrid!" Foreground="Red"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal"  Margin="10 2 2 2" x:Name="stackLinkProtected">
                        <TextBlock Text="&#x27A0;  " FontWeight="Bold" Foreground="Blue"/>
                        <TextBlock Text="Link protetto! (clicca sblocca per tentare il bypass)" Foreground="Blue"/>
                    </StackPanel>
                    
                </StackPanel>
            </GroupBox.Header>
            
            <Grid x:Name="RDGrid">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

                

                <StackPanel Orientation="Horizontal" x:Name="stackLoading" Visibility="Hidden" Panel.ZIndex="9999" Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <myControls:LoadingPanel x:Name="loadingPanel1" Panel.ZIndex="9999" Grid.RowSpan="2"/>
                    <TextBlock Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" TextAlignment="Center" TextWrapping="Wrap" x:Name="txtLoadingMessage"/>
                </StackPanel>

                <TextBlock x:Name="lblRDLinkInfo" HorizontalAlignment="Center" TextAlignment="Center" Margin="2" Visibility="Collapsed">
                    Filename: <TextBlock x:Name="lblFilename" FontWeight="Bold"/> - <TextBlock x:Name="lblFilesize" FontWeight="Bold"/>
                </TextBlock>
                
                <StackPanel Margin="2" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center" IsEnabled="False" x:Name="panelRDButtons" Grid.Row="1">
                    <Button Margin="2" Width="180" Height="30" x:Name="btnRDCopy" Click="btnRDCopy_Click">
                        <StackPanel Orientation="Horizontal">
                            <myControls:AutoGreyableImage Source="..\Resources\icon_clipboard.png" Margin="2"/>
                            <TextBlock Margin="2" VerticalAlignment="Center">Copia link</TextBlock>
                        </StackPanel>
                    </Button>
                    <Button Margin="2" Width="180" Height="30" x:Name="btnRDDownload" Click="btnRDDownload_Click">
                        <StackPanel Orientation="Horizontal">
                            <myControls:AutoGreyableImage Source="..\Resources\icon_idm.png" Margin="2"/>
                            <TextBlock Margin="2" VerticalAlignment="Center">Scarica (IDM)</TextBlock>
                        </StackPanel>
                    </Button>
                    <Button Margin="2" Width="180" Height="30" x:Name="btnRDStreamPot" Click="btnRDStreamPot_Click">
                        <StackPanel Orientation="Horizontal">
                            <myControls:AutoGreyableImage Source="..\Resources\icon_potplayer.png" Margin="2"/>
                            <TextBlock Margin="2" VerticalAlignment="Center">Stream (PotPlayer)</TextBlock>                            
                        </StackPanel>
                    </Button>
                    <Button Margin="2" Width="180" Height="30" x:Name="btnRDStreamVLC" Click="btnRDStreamVLC_Click">
                        <StackPanel Orientation="Horizontal">
                            <myControls:AutoGreyableImage Source="..\Resources\icon_vlc.png" Margin="2"/>
                            <TextBlock Margin="2" VerticalAlignment="Center">Stream (VLC)</TextBlock>
                        </StackPanel>
                    </Button>
                </StackPanel>

                <StackPanel Margin="2" VerticalAlignment="Center" Orientation="Vertical" HorizontalAlignment="Center" x:Name="panelError" Grid.Row="1" Visibility="Hidden">
                    <TextBlock Margin="2" Text="ERRORE" FontWeight="Bold" Foreground="Red" HorizontalAlignment="Center" TextAlignment="Center"/>
                    <TextBlock Margin="2" x:Name="lblError" HorizontalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap"/>
                </StackPanel>
            </Grid>
            
        </GroupBox>
    </Grid>
</UserControl>
